<?php $this->load->view('layout/header');?>
<div class="container-fluid">
    <div class="row-fluid">
        <div class="span12">
            <h3 class="page-title">评价管理<small> 商品评价管理</small></h3>
            <?php echo breadcrumb(array('评价管理', 'tourismreviews/grid'=>'商品评价管理', '编辑商品评价')); ?>
        </div>
    </div>
    <?php echo execute_alert_message() ?>
    <div class="row-fluid">
        <div class="span6">
            <div class="portlet box green">
                <div class="portlet-title">
                    <div class="caption"><i class="icon-plus-sign"></i>编辑评价管理</div>
                    <div class="tools">
                        <a class="collapse" href="javascript:;"></a>
                        <a class="remove" href="javascript:;"></a>
                    </div>
                </div>
                <div class="portlet-body form">
                    <form class="form-horizontal line-form" action="<?php echo base_url('tourismreviews/editPost') ?>" method="post" enctype="multipart/form-data">
                        <div class="control-group">
                            <label class="control-label">订单ID</label>
                            <div class="controls">
                                <input type="hidden" name="id" value="<?php echo $tourismreviews->id ?>">
                                <input type="text" name="order_id" value="<?php echo $tourismreviews->order_id ?>" class="m-wrap span10" disabled="disabled">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">订单产品ID</label>
                            <div class="controls">
                                <input type="text" name="order_product_id" value="<?php echo $tourismreviews->order_product_id ?>" class="m-wrap span10" disabled="disabled">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">商品ID</label>
                            <div class="controls">
                                <input type="text" name="goods_attr_id" value="<?php echo $tourismreviews->goods_attr_id ?>" class="m-wrap span10" disabled="disabled">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">产品名称</label>
                            <div class="controls">
                                <label class="checkbox"><?php echo $tourismreviews->goods_name ?></label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">用户名称</label>
                            <div class="controls">
                                <input type="text" name="user_name" value="<?php echo $tourismreviews->user_name ?>" class="m-wrap span10" disabled="disabled">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label"><em>* </em>评价星级</label>
                            <div class="controls">
                                <input type="text" name="review_score" value="<?php echo $tourismreviews->review_score ?>" class="m-wrap span10 number required" placeholder="请输入最大值为5的数字">
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label"><em>* </em>评价内容</label>
                            <div class="controls">
                                <textarea class="m-wrap span10 required" name="user_content"><?php echo $tourismreviews->user_content ?></textarea>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">评价状态</label>
                            <div class="controls">
                                <select class="m-wrap span10" name="status">
                                    <option value="">请选择...</option>
                                    <?php foreach (array(1=>'待审核', 2=>'通过', 3=>'未通过') as $key=>$value) :?>
                                        <option value="<?php echo $key ?>" <?php if ($key == $tourismreviews->status): ?>selected="selected"<?php endif?>><?php echo $value ?></option>
                                    <?php endforeach;?>
                                </select>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">评价时间</label>
                            <div class="controls">
                                <label class="checkbox"><?php echo $tourismreviews->created_at ?></label>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label">更新时间</label>
                            <div class="controls">
                                <label class="checkbox"><?php echo $tourismreviews->updated_at ?></label>
                            </div>
                        </div>
                        <div class="form-actions">
                            <button class="btn green" type="submit"><i class="icon-ok"></i> 保存</button>
                            <a href="<?php echo base_url('tourismreviews/grid') ?>">
                                <button class="btn" type="button">返回</button>
                            </a>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <div class="span6">
            <div class="portlet box green">
                <div class="portlet-title">
                    <div class="caption"><i class="icon-plus-sign"></i>评价回复管理</div>
                    <div class="tools">
                        <a class="collapse" href="javascript:;"></a>
                        <a class="remove" href="javascript:;"></a>
                    </div>
                </div>
                <div class="portlet-body form">
                    <div class="media">
                        <a class="pull-left" href="javascript:;">
                            <img class="media-object" src="skins/admin/images/9.jpg" width=54 height=54>
                        </a>
                        <div class="media-body">
                            <h4 class="media-heading"><?php echo $tourismreviews->user_name ?> <span><?php echo $tourismreviews->created_at ?> / 评价</span></h4>
                            <p><?php echo $tourismreviews->user_content ?> </p>
                            <?php if ($tourismReviewsReply->num_rows() > 0) :?>
                                <?php foreach ($tourismReviewsReply->result() as $reply): ?>
                                <hr>
                                <div class="media">
                                    <a class="pull-left" href="javascript:;">
                                        <img class="media-object" src="skins/admin/images/5.jpg" width=54 height=54>
                                    </a>
                                    <div class="media-body">
                                        <h4 class="media-heading"><?php echo $reply->reply_user_name ?> <span><?php echo $reply->created_at ?> / 回复</span><a href="javascript:;" class="deleteReply" data-id="<?php echo $reply->id;?>"> / 删除</a></h4>
                                        <p><?php echo $reply->reply_content ?> </p>
                                    </div>
                                </div>
                                <?php endforeach;?>
                            <?php endif;?>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<?php $this->load->view('layout/footer');?>